<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	template="/WEB-INF/jsf/template.xhtml">

	<ui:define name="content">
		<h:form prependId="false">
			<p:commandButton image="back" ajax="false" immediate="true" style="margin-right:20px;" value="#{adherentmsgs['navigation.back']}" action="/jsf/adherent/listAdherents.xhtml"/>
		
			<p:panel header="#{adherentmsgs['adherent.title']} Details" style="margin-top:10px">
				<p:messages />
				<h:panelGrid id="detail" columns="2" styleClass="grid" columnClasses="label,value">
						<h:outputText value="#{adherentmsgs['adherent.adhid.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.adhId}"/>
						<h:outputText value="#{adherentmsgs['adherent.adhcin.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.adhCin}"/>
						<h:outputText value="#{adherentmsgs['adherent.adhimmatriculation.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.adhImmatriculation}"/>
						<h:outputText value="#{adherentmsgs['adherent.adhaffiliation.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.adhAffiliation}"/>
						<h:outputText value="#{adherentmsgs['adherent.adhdateaffiliation.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.adhDateAffiliation}"  converter="dateConverterForCalendar" />
						<h:outputText value="#{adherentmsgs['adherent.adhpension.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.adhPension}"/>
						<h:outputText value="#{adherentmsgs['adherent.adhsom.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.adhSom}"/>
				</h:panelGrid>
			</p:panel>

			<p:panel header="#{adherentmsgs['tiers.title']} Details" style="margin-top:10px">
				<p:messages />
				<h:panelGrid id="tiers" columns="2" styleClass="grid" columnClasses="label,value" rendered="#{AdherentComponent.adherent.tiers != null}" >
					<h:outputText value="#{adherentmsgs['tiers.tietiers.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.tiers.tieTiers}"/>
					<h:outputText value="#{adherentmsgs['tiers.tieidentclient.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.tiers.tieIdentClient}"/>
					<h:outputText value="#{adherentmsgs['tiers.tietypetiers.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.tiers.tieTypeTiers}"/>
					<h:outputText value="#{adherentmsgs['tiers.tielibexterne.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.tiers.tieLibExterne}"/>
					<h:outputText value="#{adherentmsgs['tiers.tienationalite.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.tiers.tieNationalite}"/>
					<h:outputText value="#{adherentmsgs['tiers.tietelfix.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.tiers.tieTelFix}"/>
					<h:outputText value="#{adherentmsgs['tiers.tietelbureau.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.tiers.tieTelBureau}"/>
					<h:outputText value="#{adherentmsgs['tiers.tietelportable.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.tiers.tieTelPortable}"/>
					<h:outputText value="#{adherentmsgs['tiers.tiefax.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.tiers.tieFax}"/>
					<h:outputText value="#{adherentmsgs['tiers.tieemail.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.tiers.tieEMail}"/>
					<h:outputText value="#{adherentmsgs['tiers.tiedatecreation.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.tiers.tieDateCreation}"  converter="dateConverterForCalendar" />
					<h:outputText value="#{adherentmsgs['tiers.tieusercreation.title']}:" />
							<h:outputText value="#{AdherentComponent.adherent.tiers.tieUserCreation}"/>
				</h:panelGrid>
				<h:panelGrid columns="2" styleClass="grid" columnClasses="label,value" rendered="#{AdherentComponent.adherent.tiers != null}" >
					<p:commandButton image="edit" ajax="false" style="margin-right:20px;" value="#{adherentmsgs['navigation.edit']}" action="#{AdherentComponent.editAdherentTiers(AdherentComponent.adherent.adhId, AdherentComponent.adherent.tiers.tieTiers)}"/>
					<p:commandButton image="delete" ajax="false" style="margin-right:20px;" value="#{adherentmsgs['navigation.delete']}" action="#{AdherentComponent.confirmDeleteAdherentTiers(AdherentComponent.adherent.adhId, AdherentComponent.adherent.tiers.tieTiers)}"/>
				</h:panelGrid>
				<h:panelGrid columns="1" styleClass="grid" columnClasses="label,value" rendered="#{AdherentComponent.adherent.tiers == null}" >
					<p:commandButton image="new" ajax="false" style="margin-right:20px;" value="#{adherentmsgs['navigation.new']}" action="#{AdherentComponent.newAdherentTiers(AdherentComponent.adherent.adhId)}"/>
				</h:panelGrid>
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>